3.348 \(\int \frac{\log (\frac{a}{x})}{a x-x^2} \, dx\)

Optimal. Leaf size=14 \[ \frac{\text{PolyLog}\left (2,1-\frac{a}{x}\right )}{a} \]

[Out]

PolyLog[2, 1 - a/x]/a

________________________________________________________________________________________

Rubi [A]  time = 0.0767902, antiderivative size = 14, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 18, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.222, Rules used = {1593, 2343, 2333, 2315} \[ \frac{\text{PolyLog}\left (2,1-\frac{a}{x}\right )}{a} \]

Antiderivative was successfully verified.

[In]

Int[Log[a/x]/(a*x - x^2),x]

[Out]

PolyLog[2, 1 - a/x]/a

Rule 1593

Int[(u_.)*((a_.)*(x_)^(p_.) + (b_.)*(x_)^(q_.))^(n_.), x_Symbol] :> Int[u*x^(n*p)*(a + b*x^(q - p))^n, x] /; F
reeQ[{a, b, p, q}, x] && IntegerQ[n] && PosQ[q - p]

Rule 2343

Int[((a_.) + Log[(c_.)*(x_)^(n_)]*(b_.))/((x_)*((d_) + (e_.)*(x_)^(r_.))), x_Symbol] :> Dist[1/n, Subst[Int[(a
 + b*Log[c*x])/(x*(d + e*x^(r/n))), x], x, x^n], x] /; FreeQ[{a, b, c, d, e, n, r}, x] && IntegerQ[r/n]

Rule 2333

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_) + (e_.)/(x_))^(q_.)*(x_)^(m_.), x_Symbol] :> Int[(e + d*
x)^q*(a + b*Log[c*x^n])^p, x] /; FreeQ[{a, b, c, d, e, m, n, p}, x] && EqQ[m, q] && IntegerQ[q]

Rule 2315

Int[Log[(c_.)*(x_)]/((d_) + (e_.)*(x_)), x_Symbol] :> -Simp[PolyLog[2, 1 - c*x]/e, x] /; FreeQ[{c, d, e}, x] &
& EqQ[e + c*d, 0]

Rubi steps

\begin{align*} \int \frac{\log \left (\frac{a}{x}\right )}{a x-x^2} \, dx &=\int \frac{\log \left (\frac{a}{x}\right )}{(a-x) x} \, dx\\ &=-\operatorname{Subst}\left (\int \frac{\log (a x)}{\left (a-\frac{1}{x}\right ) x} \, dx,x,\frac{1}{x}\right )\\ &=-\operatorname{Subst}\left (\int \frac{\log (a x)}{-1+a x} \, dx,x,\frac{1}{x}\right )\\ &=\frac{\text{Li}_2\left (1-\frac{a}{x}\right )}{a}\\ \end{align*}

Mathematica [A]  time = 0.0037964, size = 16, normalized size = 1.14 \[ \frac{\text{PolyLog}\left (2,-\frac{a-x}{x}\right )}{a} \]

Antiderivative was successfully verified.

[In]

Integrate[Log[a/x]/(a*x - x^2),x]

[Out]

PolyLog[2, -((a - x)/x)]/a

________________________________________________________________________________________

Maple [A]  time = 0.04, size = 11, normalized size = 0.8 \begin{align*}{\frac{1}{a}{\it dilog} \left ({\frac{a}{x}} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(ln(a/x)/(a*x-x^2),x)

[Out]

1/a*dilog(a/x)

________________________________________________________________________________________

Maxima [B]  time = 1.16487, size = 97, normalized size = 6.93 \begin{align*} -{\left (\frac{\log \left (-a + x\right )}{a} - \frac{\log \left (x\right )}{a}\right )} \log \left (\frac{a}{x}\right ) - \frac{2 \, \log \left (-a + x\right ) \log \left (x\right ) - \log \left (x\right )^{2}}{2 \, a} + \frac{\log \left (x\right ) \log \left (-\frac{x}{a} + 1\right ) +{\rm Li}_2\left (\frac{x}{a}\right )}{a} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(log(a/x)/(a*x-x^2),x, algorithm="maxima")

[Out]

-(log(-a + x)/a - log(x)/a)*log(a/x) - 1/2*(2*log(-a + x)*log(x) - log(x)^2)/a + (log(x)*log(-x/a + 1) + dilog
(x/a))/a

________________________________________________________________________________________

Fricas [A]  time = 1.25383, size = 26, normalized size = 1.86 \begin{align*} \frac{{\rm Li}_2\left (-\frac{a}{x} + 1\right )}{a} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(log(a/x)/(a*x-x^2),x, algorithm="fricas")

[Out]

dilog(-a/x + 1)/a

________________________________________________________________________________________

Sympy [C]  time = 7.58479, size = 71, normalized size = 5.07 \begin{align*} - \left (\begin{cases} - \frac{1}{x} & \text{for}\: a = 0 \\\frac{\log{\left (\frac{a}{x} - 1 \right )}}{a} & \text{otherwise} \end{cases}\right ) \log{\left (\frac{a}{x} \right )} - \begin{cases} \frac{1}{x} & \text{for}\: a = 0 \\\frac{\begin{cases} i \pi \log{\left (x \right )} + \operatorname{Li}_{2}\left (\frac{a}{x}\right ) & \text{for}\: \left |{x}\right | < 1 \\- i \pi \log{\left (\frac{1}{x} \right )} + \operatorname{Li}_{2}\left (\frac{a}{x}\right ) & \text{for}\: \frac{1}{\left |{x}\right |} < 1 \\- i \pi{G_{2, 2}^{2, 0}\left (\begin{matrix} & 1, 1 \\0, 0 & \end{matrix} \middle |{x} \right )} + i \pi{G_{2, 2}^{0, 2}\left (\begin{matrix} 1, 1 & \\ & 0, 0 \end{matrix} \middle |{x} \right )} + \operatorname{Li}_{2}\left (\frac{a}{x}\right ) & \text{otherwise} \end{cases}}{a} & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(ln(a/x)/(a*x-x**2),x)

[Out]

-Piecewise((-1/x, Eq(a, 0)), (log(a/x - 1)/a, True))*log(a/x) - Piecewise((1/x, Eq(a, 0)), (Piecewise((I*pi*lo
g(x) + polylog(2, a/x), Abs(x) < 1), (-I*pi*log(1/x) + polylog(2, a/x), 1/Abs(x) < 1), (-I*pi*meijerg(((), (1,
 1)), ((0, 0), ()), x) + I*pi*meijerg(((1, 1), ()), ((), (0, 0)), x) + polylog(2, a/x), True))/a, True))

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\log \left (\frac{a}{x}\right )}{a x - x^{2}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(log(a/x)/(a*x-x^2),x, algorithm="giac")

[Out]

integrate(log(a/x)/(a*x - x^2), x)